#ifndef B2_USER_DATA_MANAGER_H
#define B2_USER_DATA_MANAGER_H

#include "b2d_common.h"
#include "b2UserData.h"

using namespace std;

class b2UserDataManager {

	public:
		b2UserDataManager();
		~b2UserDataManager();
	
		

		bool has(string s);
		
		b2UserData* get(string s);
		b2Body* getBody(string s);
		b2Joint* getJoint(string s);
		b2Shape* getShape(string s);

		
		void add(string s, b2UserData*);
		bool remove(string s); 
		
		void reset();
		

	
		
	private:
		typedef map<string, b2UserData* > UserDataHash;	// this is a type to keep our userdata by name

		UserDataHash udh;
	

};


#endif		
